﻿namespace CRM.Business.Services
{
    using System.Collections.Generic;
    using CRM.DataAccess.DAOs;
    using CRM.DataAccess.Entities;
    using System;

    public static class QuoteService
    {
        /// Gets or sets the role DAO.
        private static QuoteDAO QuoteDAO = new QuoteDAO();

        //Delete Quote
        public static int DeleteQuote(long quoteID)
        {
            return QuoteDAO.DeleteQuote(quoteID);
        }
        //get  Invoice by ID
        public static QUOTE GetQuoteByID(long ID)
        {
            return QuoteDAO.GetQuoteByID(ID);
        }
        //Update Invoice
        public static int UpdateQuote(QUOTE quote, ITEM item, List<ITEM_DETAIL> itemDetails)
        {
            return QuoteDAO.UpdateQuote(quote, item, itemDetails);
        }
         //Get quote detail by QUOTE_ID
        public static QUOTE_DETAIL GetQuoteDetailByID(long QuoteID)
        {
            return QuoteDAO.GetQuoteDetailByID(QuoteID);
        }
        //Get quote by condition
        public static List<QUOTE_DETAIL> GetQuoteByCondition(DateTime? dateFrom, DateTime? dateTo, string subject, long? quoteStage_ID, List<long?> ListConID, List<long?> ListOrgID, long? assignUser_ID)
        {
            return QuoteDAO.GetQuoteByCondition(dateFrom, dateTo,subject, quoteStage_ID, ListConID, ListOrgID, assignUser_ID);
        }
        //Get All Contact
        public static List<QUOTE_STAGE> GetAllQuoteStage()
        {
            return QuoteDAO.GetAllQuoteStage();
        }       
        //Add new quote
        public static int AddNewQuote(QUOTE quote, ITEM item, List<ITEM_DETAIL> itemDetails)
        {
            return QuoteDAO.AddNewQuote(quote, item, itemDetails);
        }
    }
}
